<template>
  <header class="app-header">
    <div class="header-left">
      <slot name="left"></slot>
    </div>
    <h2>{{ title }}</h2>
    <!-- Slot for optional right-side content like buttons -->
    <div class="header-right">
      <slot name="right"></slot>
    </div>
  </header>
</template>

<script>
export default {
  name: 'AppHeader',
  props: {
    title: {
      type: String,
      required: true
    }
  }
}
</script>

<style lang="scss" scoped>
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background-color: var(--el-color-primary); /* Assuming primary color is blue */
  color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 45px; /* Define a fixed height for consistency */
}

.app-header h2 {
  margin: 0;
  color: #fff;
  font-size: 18px;
}

.header-left {
  /* Styles for the container of left-aligned elements */
  display: flex;
  align-items: center;
  margin-right: 10px;
}

.header-right {
  /* Styles for the container of right-aligned elements */
}
</style> 